package com.mobsandgeeks.adapters.samples;

import com.mobsandgeeks.adapters.InstantAdapter;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry;
import ohos.agp.components.ListContainer;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class ExampleOhosTest {
    @Test
    public void testBundleName() {
        Ability ability = AbilityDelegatorRegistry.getAbilityDelegator().getCurrentTopAbility();
        ListContainer listContainer = new ListContainer(ability);
        InstantAdapter<Book> bookListAdapter = new InstantAdapter<Book>(
                ability, ResourceTable.Layout_list_layout, Book.class,
                BooksDao.getAllBooks());
        listContainer.setItemProvider(bookListAdapter);
    }
}